package com.iris.live.services.data.models;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * Created by HangLiu on 2017/2/20.
 */
@Entity
@Table(name = "t_endorsement_info", schema = "live", catalog = "")
public class TEndorsementInfoModel {
    private Integer pdId;
    private Integer insId;
    private String instype;
    private String year;
    private String endorsementId;
    private String endorsementTime;
    private String insExitTime;
    private String insExitRemark;
    private String remark;
    private String endorsementType;
    private String state;
    private String updateid;
    private Timestamp updatetime;
    private BigDecimal endorsementMoney; //批单金额
    private BigDecimal poundage; // 手续费

    @Id
    @Column(name = "pdID")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getPdId() {
        return pdId;
    }

    public void setPdId(Integer pdId) {
        this.pdId = pdId;
    }

    @Basic
    @Column(name = "insID")
    public Integer getInsId() {
        return insId;
    }

    public void setInsId(Integer insId) {
        this.insId = insId;
    }

    @Basic
    @Column(name = "instype")
    public String getInstype() {
        return instype;
    }

    public void setInstype(String instype) {
        this.instype = instype;
    }

    @Basic
    @Column(name = "year")
    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    @Basic
    @Column(name = "endorsementId")
    public String getEndorsementId() {
        return endorsementId;
    }

    public void setEndorsementId(String endorsementId) {
        this.endorsementId = endorsementId;
    }

    @Basic
    @Column(name = "endorsement_time")
    public String getEndorsementTime() {
        return endorsementTime;
    }

    public void setEndorsementTime(String endorsementTime) {
        this.endorsementTime = endorsementTime;
    }

    @Basic
    @Column(name = "ins_exit_time")
    public String getInsExitTime() {
        return insExitTime;
    }

    public void setInsExitTime(String insExitTime) {
        this.insExitTime = insExitTime;
    }

    @Basic
    @Column(name = "ins_exit_remark")
    public String getInsExitRemark() {
        return insExitRemark;
    }

    public void setInsExitRemark(String insExitRemark) {
        this.insExitRemark = insExitRemark;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "endorsement_type")
    public String getEndorsementType() {
        return endorsementType;
    }

    public void setEndorsementType(String endorsementType) {
        this.endorsementType = endorsementType;
    }

    @Basic
    @Column(name = "state")
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Basic
    @Column(name = "updateid")
    public String getUpdateid() {
        return updateid;
    }

    public void setUpdateid(String updateid) {
        this.updateid = updateid;
    }

    @Basic
    @Column(name = "updatetime")
    public Timestamp getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Timestamp updatetime) {
        this.updatetime = updatetime;
    }

    @Basic
    @Column(name = "endorsementMoney")
    public BigDecimal getEndorsementMoney() {
        return endorsementMoney;
    }

    public void setEndorsementMoney(BigDecimal endorsementMoney) {
        this.endorsementMoney = endorsementMoney;
    }

    @Basic
    @Column(name = "poundage")
    public BigDecimal getPoundage() {
        return poundage;
    }

    public void setPoundage(BigDecimal poundage) {
        this.poundage = poundage;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TEndorsementInfoModel that = (TEndorsementInfoModel) o;

        if (pdId != null ? !pdId.equals(that.pdId) : that.pdId != null) return false;
        if (insId != null ? !insId.equals(that.insId) : that.insId != null) return false;
        if (instype != null ? !instype.equals(that.instype) : that.instype != null) return false;
        if (year != null ? !year.equals(that.year) : that.year != null) return false;
        if (endorsementId != null ? !endorsementId.equals(that.endorsementId) : that.endorsementId != null)
            return false;
        if (endorsementTime != null ? !endorsementTime.equals(that.endorsementTime) : that.endorsementTime != null)
            return false;
        if (insExitTime != null ? !insExitTime.equals(that.insExitTime) : that.insExitTime != null) return false;
        if (insExitRemark != null ? !insExitRemark.equals(that.insExitRemark) : that.insExitRemark != null)
            return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;
        if (endorsementType != null ? !endorsementType.equals(that.endorsementType) : that.endorsementType != null)
            return false;
        if (state != null ? !state.equals(that.state) : that.state != null) return false;
        if (updateid != null ? !updateid.equals(that.updateid) : that.updateid != null) return false;
        if (updatetime != null ? !updatetime.equals(that.updatetime) : that.updatetime != null) return false;
        if (endorsementMoney != null ? !endorsementMoney.equals(that.endorsementMoney) : that.endorsementMoney != null) return false;
        if (poundage != null ? !poundage.equals(that.poundage) : that.poundage != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = pdId != null ? pdId.hashCode() : 0;
        result = 31 * result + (insId != null ? insId.hashCode() : 0);
        result = 31 * result + (instype != null ? instype.hashCode() : 0);
        result = 31 * result + (year != null ? year.hashCode() : 0);
        result = 31 * result + (endorsementId != null ? endorsementId.hashCode() : 0);
        result = 31 * result + (endorsementTime != null ? endorsementTime.hashCode() : 0);
        result = 31 * result + (insExitTime != null ? insExitTime.hashCode() : 0);
        result = 31 * result + (insExitRemark != null ? insExitRemark.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        result = 31 * result + (endorsementType != null ? endorsementType.hashCode() : 0);
        result = 31 * result + (state != null ? state.hashCode() : 0);
        result = 31 * result + (updateid != null ? updateid.hashCode() : 0);
        result = 31 * result + (updatetime != null ? updatetime.hashCode() : 0);
        result = 31 * result + (endorsementMoney != null ? endorsementMoney.hashCode() : 0);
        result = 31 * result + (poundage != null ? poundage.hashCode() : 0);
        return result;
    }
}
